﻿using UnityEngine;
using UnityEngine.UI;
public class ShopItem : MonoBehaviour {
	public ItemType type;
	public int index;
	public int price;
	public Image img;
	public Button btn;
	public Image selectedImg;
	public GameObject costGroup;
	public Text priceText;

	public int ballLockStage
	{
		get{ return PlayerPrefs.GetInt("ball"+index.ToString());}
		set
		{
			PlayerPrefs.SetInt ("ball" + index.ToString (), value);
		}
	}

	public int mapLockStage
	{
		get{ return PlayerPrefs.GetInt ("map" + index.ToString ());}
		set
		{
			PlayerPrefs.SetInt ("map" + index.ToString (), value);
		}
	}

	private void Start()
	{
		btn.onClick.AddListener (OnClickButton);
		CheckStatus ();
	}
	public virtual void CheckStatus()
	{
	}
	public virtual void OnClickButton()
	{

	}
}
